﻿Imports MySql.Data.MySqlClient
Public Class Form1
    Dim tim1 As Integer = 457
    Dim setting As New My.MySettings
    Public brs As Integer
    Public texta As String
    Public textnum As String
    Dim automat As String
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' Генерирование запроса SQL для locales_item
        Dim loc(0 To 7) As String
        Dim loc2(0 To 7) As String
        loc(ComboBox1.SelectedIndex) = TextBox2.Text.Replace("'", "\'")
        loc2(ComboBox1.SelectedIndex) = TextBox3.Text.Replace("'", "\'")
        TextBox4.Text = String.Format("REPLACE INTO `locales_item` VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}');", _
                                      TextBox1.Text, loc(0), loc(1), loc(2), loc(3), loc(4), loc(5), loc(6), loc(7), loc2(0), loc2(1), loc2(2), loc2(3), loc2(4), loc2(5), loc2(6), loc2(7))
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        ' Генерирование запроса SQL для locales_creature
        Dim loc = 7
        Dim name(0 To loc) As String
        Dim subname(0 To loc) As String
        'null
        For i As Integer = 0 To loc
            subname(i) = "null"
        Next i
        name(ComboBox1.SelectedIndex) = String.Format("{0}", TextBox6.Text.Replace("'", "\'"))
        subname(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox5.Text.Replace("'", "\'"))
        TextBox4.Text = String.Format("REPLACE INTO `locales_creature` VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16});", _
                                      TextBox7.Text, name(0), name(1), name(2), name(3), name(4), name(5), name(6), name(7), subname(0), subname(1), subname(2), subname(3), subname(4), subname(5), subname(6), subname(7))

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        ' Генерирование запроса SQL для locales_quest
        Dim loc = 7
        Dim Title(0 To loc) As String
        Dim Details(0 To loc) As String
        Dim objectives(0 To loc) As String
        Dim ORT(0 To loc) As String
        Dim RIT(0 To loc) As String
        Dim EndText(0 To loc) As String
        'null
        For i As Integer = 0 To loc
            Title(i) = "null"
            Details(i) = "null"
            objectives(i) = "null"
            ORT(i) = "null"
            RIT(i) = "null"
            EndText(i) = "null"
        Next i
        Title(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox9.Text.Replace("'", "\'"))
        Details(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox8.Text.Replace("'", "\'"))
        objectives(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox11.Text.Replace("'", "\'"))
        ORT(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox12.Text.Replace("'", "\'"))
        RIT(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox13.Text.Replace("'", "\'"))
        EndText(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox14.Text.Replace("'", "\'"))
        TextBox4.Text = String.Format("REPLACE INTO `locales_quest` VALUES ('{0}', {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24}, {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}, {33}, {34}, {35}, {36}, {37}, {38}, {39}, {40}, {41}, {42}, {43}, {44}, {45}, {46}, {47}, {48}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);", _
                                      TextBox10.Text, Title(0), Title(1), Title(2), Title(3), Title(4), Title(5), Title(6), Title(7), Details(0), Details(1), Details(2), Details(3), Details(4), Details(5), Details(6), Details(7), objectives(0), objectives(1), objectives(2), objectives(3), objectives(4), objectives(5), objectives(6), objectives(7), ORT(0), ORT(1), ORT(2), ORT(3), ORT(4), ORT(5), ORT(6), ORT(7), RIT(0), RIT(1), RIT(2), RIT(3), RIT(4), RIT(5), RIT(6), RIT(7), EndText(0), EndText(1), EndText(2), EndText(3), EndText(4), EndText(5), EndText(6), EndText(7))

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        ' Генерирование запроса SQL для locales_gameobject
        Dim loc(0 To 7) As String
        Dim loc2(0 To 7) As String
        loc(ComboBox1.SelectedIndex) = TextBox16.Text.Replace("'", "\'")
        loc2(ComboBox1.SelectedIndex) = TextBox15.Text.Replace("'", "\'")
        TextBox4.Text = String.Format("REPLACE INTO `locales_gameobject` VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}');", _
                                      TextBox17.Text, loc(0), loc(1), loc(2), loc(3), loc(4), loc(5), loc(6), loc(7), loc2(0), loc2(1), loc2(2), loc2(3), loc2(4), loc2(5), loc2(6), loc2(7))
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        ' Генерирование запроса SQL для locales_gossip_menu_option
        Dim loc = 7
        Dim optiontext(0 To 7) As String
        Dim boxtext(0 To 7) As String
        'null
        For i As Integer = 0 To loc
            optiontext(i) = "null"
            boxtext(i) = "null"
        Next i
        optiontext(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox18.Text.Replace("'", "\'"))
        boxtext(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox21.Text.Replace("'", "\'"))
        TextBox4.Text = String.Format("REPLACE INTO `locales_gossip_menu_option` VALUES ('{0}', '{1}', {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17});", _
                                      TextBox20.Text, TextBox19.Text, optiontext(0), optiontext(1), optiontext(2), optiontext(3), optiontext(4), optiontext(5), optiontext(6), optiontext(7), boxtext(0), boxtext(1), boxtext(2), boxtext(3), boxtext(4), boxtext(5), boxtext(6), boxtext(7))
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        ' Генерирование запроса SQL для locales_page_text
        Dim loc(0 To 7) As String
        loc(ComboBox1.SelectedIndex) = TextBox23.Text.Replace("'", "\'")
        TextBox4.Text = String.Format("REPLACE INTO `locales_page_text` VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}');", _
                                      TextBox24.Text, loc(0), loc(1), loc(2), loc(3), loc(4), loc(5), loc(6), loc(7))
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        ' Генерирование запроса SQL для locales_achievement_reward
        Dim loc = 7
        Dim subject(0 To loc) As String
        Dim text(0 To loc) As String
        'null
        For i As Integer = 0 To loc
            subject(i) = "null"
            text(i) = "null"
        Next i
        subject(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox25.Text.Replace("'", "\'"))
        text(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox22.Text.Replace("'", "\'"))

        TextBox4.Text = String.Format("REPLACE INTO `locales_achievement_reward` VALUES ('{0}', {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16});", _
                                      TextBox26.Text, subject(0), subject(1), subject(2), subject(3), subject(4), subject(5), subject(6), subject(7), text(0), text(1), text(2), text(3), text(4), text(5), text(6), text(7))

    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        ' Генерирование запроса SQL для locales_points_of_interest
        Dim loc = 7
        Dim iconname(0 To loc) As String
        'null
        For i As Integer = 0 To loc
            iconname(i) = "null"
        Next i
        iconname(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox27.Text.Replace("'", "\'"))
        TextBox4.Text = String.Format("REPLACE INTO `locales_points_of_interest` VALUES ('{0}', {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8});", _
                                      TextBox28.Text, iconname(0), iconname(1), iconname(2), iconname(3), iconname(4), iconname(5), iconname(6), iconname(7))

    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        'Кнопка "Очистить поля"
        clean()
    End Sub

    Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
        ' Генерирование запроса SQL для locales_npc_text
        Dim loc = 7
        Dim text00(0 To loc) As String
        Dim text01(0 To loc) As String
        Dim text10(0 To loc) As String
        Dim text11(0 To loc) As String
        Dim text20(0 To loc) As String
        Dim text21(0 To loc) As String
        Dim text30(0 To loc) As String
        Dim text31(0 To loc) As String
        Dim text40(0 To loc) As String
        Dim text41(0 To loc) As String
        Dim text50(0 To loc) As String
        Dim text51(0 To loc) As String
        Dim text60(0 To loc) As String
        Dim text61(0 To loc) As String
        Dim text70(0 To loc) As String
        Dim text71(0 To loc) As String
        'null
        For i As Integer = 0 To loc
            text00(i) = "null"
            text01(i) = "null"
            text10(i) = "null"
            text11(i) = "null"
            text20(i) = "null"
            text21(i) = "null"
            text30(i) = "null"
            text31(i) = "null"
            text40(i) = "null"
            text41(i) = "null"
            text50(i) = "null"
            text51(i) = "null"
            text60(i) = "null"
            text61(i) = "null"
            text70(i) = "null"
            text71(i) = "null"
        Next i
        text00(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox30.Text.Replace("'", "\'"))
        text01(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox31.Text.Replace("'", "\'"))
        text10(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox33.Text.Replace("'", "\'"))
        text11(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox32.Text.Replace("'", "\'"))
        text20(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox35.Text.Replace("'", "\'"))
        text21(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox34.Text.Replace("'", "\'"))
        text30(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox37.Text.Replace("'", "\'"))
        text31(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox36.Text.Replace("'", "\'"))
        text40(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox39.Text.Replace("'", "\'"))
        text41(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox38.Text.Replace("'", "\'"))
        text50(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox41.Text.Replace("'", "\'"))
        text51(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox40.Text.Replace("'", "\'"))
        text60(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox43.Text.Replace("'", "\'"))
        text61(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox42.Text.Replace("'", "\'"))
        text70(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox45.Text.Replace("'", "\'"))
        text71(ComboBox1.SelectedIndex) = String.Format("'{0}'", TextBox44.Text.Replace("'", "\'"))
        TextBox4.Text = String.Format("REPLACE INTO `locales_npc_text` VALUES ('{0}', {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24}, {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}, {33}, {34}, {35}, {36}, {37}, {38}, {39}, {40}, {41}, {42}, {43}, {44}, {45}, {46}, {47}, {48}, {49}, {50}, {51}, {52}, {53}, {54}, {55}, {56}, {57}, {58}, {59}, {60}, {61}, {62}, {63}, {64}, {65}, {66}, {67}, {68}, {69}, {70}, {71}, {72}, {73}, {74}, {75}, {76}, {77}, {78}, {79}, {80}, {81}, {82}, {83}, {84}, {85}, {86}, {87}, {88}, {89}, {90}, {91}, {92}, {93}, {94}, {95}, {96}, {97}, {98}, {99}, {100}, {101}, {102}, {103}, {104}, {105}, {106}, {107}, {108}, {109}, {110}, {111}, {112}, {113}, {114}, {115}, {116}, {117}, {118}, {119}, {120}, {121}, {122}, {123}, {124}, {125}, {126}, {127}, {128});", _
                                      TextBox29.Text, text00(0), text00(1), text00(2), text00(3), text00(4), text00(5), text00(6), text00(7), text01(0), text01(1), text01(2), text01(3), text01(4), text01(5), text01(6), text01(7), text10(0), text10(1), text10(2), text10(3), text10(4), text10(5), text10(6), text10(7), text11(0), text11(1), text11(2), text11(3), text11(4), text11(5), text11(6), text11(7), text20(0), text20(1), text20(2), text20(3), text20(4), text20(5), text20(6), text20(7), text21(0), text21(1), text21(2), text21(3), text21(4), text21(5), text21(6), text21(7), text30(0), text30(1), text30(2), text30(3), text30(4), text30(5), text30(6), text30(7), text31(0), text31(1), text31(2), text31(3), text31(4), text31(5), text31(6), text31(7), text40(0), text40(1), text40(2), text40(3), text40(4), text40(5), text40(6), text40(7), text41(0), text41(1), text41(2), text41(3), text41(4), text41(5), text41(6), text41(7), text50(0), text50(1), text50(2), text50(3), text50(4), text50(5), text50(6), text50(7), text51(0), text51(1), text51(2), text51(3), text51(4), text51(5), text51(6), text51(7), text60(0), text60(1), text60(2), text60(3), text60(4), text60(5), text60(6), text60(7), text61(0), text61(1), text61(2), text61(3), text61(4), text61(5), text61(6), text61(7), text70(0), text70(1), text70(2), text70(3), text70(4), text70(5), text70(6), text70(7), text71(0), text71(1), text71(2), text71(3), text71(4), text71(5), text71(6), text71(7))

    End Sub

    Private Sub ОПрограммеToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ОПрограммеToolStripMenuItem.Click
        'Код отображения "О программе"
        AboutBox1.Visible = True
    End Sub

    Private Sub ВыйтиToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ВыйтиToolStripMenuItem.Click
        'Выход из программы
        End
    End Sub

    Private Sub СправкаToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles СправкаToolStripMenuItem.Click
        'Код открытия справки
        sp.Visible = True
    End Sub

    Private Sub НастройкиToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles НастройкиToolStripMenuItem.Click
        'Таймер
        Timer1.Enabled = True

    End Sub

    Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click
        'Таймер
        Timer2.Enabled = True
    End Sub

    Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click
        'Кнопка ОК в настройках
        Timer2.Enabled = True
        'Module locales
        local()
        'Сохранение настроек в файл
        setti()
    End Sub

    Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
        'Кнопка "Применить" в настройках
        'Module locales
        local()
        'Сохранение настроек в файл
        setti()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Height = 458
        'Открытие настроек
        CheckBox2.Checked = setting.SaveCOR3
        CheckBox1.Checked = setting.SaveCOR4
        TextBox46.Text = setting.SaveCOR5
        TextBox47.Text = setting.SaveCOR6
        TextBox50.Text = setting.SaveCOR7
        If CheckBox1.Checked = True Then
            TextBox48.Text = setting.SaveCOR8
        Else
            TextBox48.Text = ""
        End If
        RadioButton1.Checked = setting.SaveCOR1
        RadioButton2.Checked = setting.SaveCOR2
        'Загрузка настроек
        'Module locales
        local()
    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        ' Код закрытия доступа к "Паролю" при нажатии "Сохранить пароль"
        If CheckBox1.Checked = True Then
            TextBox48.Enabled = False
        End If
        If CheckBox1.Checked = False Then
            TextBox48.Enabled = True
        End If
    End Sub

    Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button22.Click
        brs = 1
        ' Код открытия Веб браузера
        If TextBox1.Text = "" Then
            MsgBox("Для начала надо ввести ID предмета в поле entry", MsgBoxStyle.Question)
        Else
            br.Visible = True
        End If
    End Sub
    Dim MySqlConnection As MySqlConnection
    ' mySQL доступ к базе, и выполнение запроса
    Private Sub Button23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button23.Click
        If TextBox46.Text = "" Or TextBox47.Text = "" Or TextBox50.Text = "" Then
            MsgBox("Поля для подключения к БД не заполнены. Для того чтобы их заполнить зайдите в меню 'Настройки'", MsgBoxStyle.Question)
        Else
            If TextBox4.Text = "" Then
                MsgBox("Для выполнения запроса в БД, его необходимо сгенерировать", MsgBoxStyle.Question)
            Else
                MySqlConnection = New MySqlConnection()

                MySqlConnection.ConnectionString = "server=" & TextBox46.Text & "; user id=" & TextBox47.Text & "; password=" & TextBox48.Text & "; database=" & TextBox50.Text & ";"
                Try
                    MySqlConnection.Open()
                    'checkbox2
                    If CheckBox2.Checked = True Then
                        MessageBox.Show("Запрос успешно выполнен.")
                    End If
                Catch myerror As MySqlException
                    MessageBox.Show("Не удается подключиться к базе данных: " & myerror.Message)
                    MySqlConnection.Close()
                End Try
                Dim myadapter As New MySqlDataAdapter
                Dim sqlquary = TextBox4.Text
                Dim command As New MySqlCommand
                command.Connection = MySqlConnection
                command.CommandText = sqlquary
                myadapter.SelectCommand = command
                Dim mydata As MySqlDataReader
                mydata = command.ExecuteReader()
            End If
        End If
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        ' Сохранение sql файла
        SaveFileDialog1.Filter = "sql (*.sql)|*.sql"
        SaveFileDialog1.ShowDialog()
        If SaveFileDialog1.FileName <> "" Then
            FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
            PrintLine(1, TextBox4.Text)
            FileClose(1)
        End If
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        SaveForm.Visible = True
    End Sub

    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        Process.Start("http://ytdb.ru/")
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        ' Ограничение + и -
        If ComboBox1.Text = "loc8" Then
            Button12.Enabled = False
        Else
            Button12.Enabled = True
        End If
        If ComboBox1.Text = "loc1" Then
            Button13.Enabled = False
        Else
            Button13.Enabled = True
        End If
        ' Присвоение именам locX
        Label2.Text = "name_" & ComboBox1.Text
        Label3.Text = "description_" & ComboBox1.Text
        Label5.Text = "name_" & ComboBox1.Text
        Label4.Text = "subname_" & ComboBox1.Text
        Label8.Text = "Title_" & ComboBox1.Text
        Label7.Text = "Details_" & ComboBox1.Text
        Label10.Text = "objectives_" & ComboBox1.Text
        Label11.Text = "OfferRewardText_" & ComboBox1.Text
        Label12.Text = "RequestItemsText_" & ComboBox1.Text
        Label13.Text = "EndText_" & ComboBox1.Text
        Label15.Text = "name_" & ComboBox1.Text
        Label14.Text = "castbarcaption_" & ComboBox1.Text
        Label17.Text = "option_" & ComboBox1.Text
        Label20.Text = "box_text_" & ComboBox1.Text
        Label29.Text = "Text0_0_" & ComboBox1.Text
        Label30.Text = "Text0_1_" & ComboBox1.Text
        Label32.Text = "Text1_0_" & ComboBox1.Text
        Label31.Text = "Text1_1_" & ComboBox1.Text
        Label34.Text = "Text2_0_" & ComboBox1.Text
        Label33.Text = "Text2_1_" & ComboBox1.Text
        Label36.Text = "Text3_0_" & ComboBox1.Text
        Label35.Text = "Text3_1_" & ComboBox1.Text
        Label38.Text = "Text4_0_" & ComboBox1.Text
        Label37.Text = "Text4_1_" & ComboBox1.Text
        Label40.Text = "Text5_0_" & ComboBox1.Text
        Label39.Text = "Text5_1_" & ComboBox1.Text
        Label42.Text = "Text6_0_" & ComboBox1.Text
        Label41.Text = "Text6_1_" & ComboBox1.Text
        Label44.Text = "Text7_0_" & ComboBox1.Text
        Label43.Text = "Text7_1_" & ComboBox1.Text
        Label26.Text = "icon_name_" & ComboBox1.Text
        Label22.Text = "Text_" & ComboBox1.Text
        Label24.Text = "subject_" & ComboBox1.Text
        Label21.Text = "Text_" & ComboBox1.Text
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        ComboBox1.SelectedIndex = ComboBox1.SelectedIndex + 1
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        ComboBox1.SelectedIndex = ComboBox1.SelectedIndex - 1
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Me.Height = tim1
        tim1 = tim1 + 4
        If Me.Height >= 605 Then
            Timer1.Enabled = False
            Me.Height = 605
        End If
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        Me.Height = tim1
        tim1 = tim1 - 4
        If Me.Height <= 458 Then
            Timer2.Enabled = False
            Me.Height = 458
        End If
        TimerError()
    End Sub
    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        texta = TextBox23.Text
        textnum = 23
        Textb.Visible = True
    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        brs = 2
        ' Код открытия Веб браузера
        If TextBox7.Text = "" Then
            MsgBox("Для начала надо ввести ID существа в поле entry", MsgBoxStyle.Question)
        Else
            br.Visible = True
        End If
    End Sub

    Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
        brs = 3
        ' Код открытия Веб браузера
        If TextBox17.Text = "" Then
            MsgBox("Для начала надо ввести ID объекта в поле entry", MsgBoxStyle.Question)
        Else
            br.Visible = True
        End If
    End Sub

    Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
        brs = 4
        ' Код открытия Веб браузера
        If TextBox10.Text = "" Then
            MsgBox("Для начала надо ввести ID квеста в поле entry", MsgBoxStyle.Question)
        Else
            br.Visible = True
        End If
    End Sub

    Private Sub Button24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button24.Click
        'Открытие дополнительного текстового окна
        texta = TextBox8.Text
        textnum = 1
        Textb.Visible = True
    End Sub

    Private Sub Button25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button25.Click
        texta = TextBox11.Text
        textnum = 2
        Textb.Visible = True
    End Sub

    Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click
        texta = TextBox12.Text
        textnum = 3
        Textb.Visible = True
    End Sub

    Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button27.Click
        texta = TextBox13.Text
        textnum = 4
        Textb.Visible = True
    End Sub

    Private Sub Button28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click
        texta = TextBox14.Text
        textnum = 5
        Textb.Visible = True
    End Sub

    Private Sub Button29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button29.Click
        texta = TextBox22.Text
        textnum = 6
        Textb.Visible = True
    End Sub

    Private Sub Button34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button34.Click
        texta = TextBox30.Text
        textnum = 7
        Textb.Visible = True
    End Sub

    Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button33.Click
        texta = TextBox33.Text
        textnum = 8
        Textb.Visible = True
    End Sub

    Private Sub Button32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click
        texta = TextBox35.Text
        textnum = 9
        Textb.Visible = True
    End Sub

    Private Sub Button31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button31.Click
        texta = TextBox37.Text
        textnum = 10
        Textb.Visible = True
    End Sub

    Private Sub Button30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button30.Click
        texta = TextBox39.Text
        textnum = 11
        Textb.Visible = True
    End Sub

    Private Sub Button37_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button37.Click
        texta = TextBox41.Text
        textnum = 12
        Textb.Visible = True
    End Sub

    Private Sub Button36_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36.Click
        texta = TextBox43.Text
        textnum = 13
        Textb.Visible = True
    End Sub

    Private Sub Button35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button35.Click
        texta = TextBox45.Text
        textnum = 14
        Textb.Visible = True
    End Sub

    Private Sub Button45_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button45.Click
        texta = TextBox31.Text
        textnum = 15
        Textb.Visible = True
    End Sub

    Private Sub Button44_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button44.Click
        texta = TextBox32.Text
        textnum = 16
        Textb.Visible = True
    End Sub

    Private Sub Button43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button43.Click
        texta = TextBox34.Text
        textnum = 17
        Textb.Visible = True
    End Sub

    Private Sub Button42_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button42.Click
        texta = TextBox36.Text
        textnum = 18
        Textb.Visible = True
    End Sub

    Private Sub Button41_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button41.Click
        texta = TextBox38.Text
        textnum = 19
        Textb.Visible = True
    End Sub

    Private Sub Button40_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button40.Click
        texta = TextBox40.Text
        textnum = 20
        Textb.Visible = True
    End Sub

    Private Sub Button39_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button39.Click
        texta = TextBox42.Text
        textnum = 21
        Textb.Visible = True
    End Sub

    Private Sub Button38_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button38.Click
        texta = TextBox44.Text
        textnum = 22
        Textb.Visible = True
    End Sub
End Class